package com.locator.services;

public class ServiceUtils {
	static String toTimeString(int hours, int minutes){
		String ret = toDoubleNum(hours) + ":" + toDoubleNum(minutes);
		return ret;
	}
	
	static String toDateString(int day, int month, int year){
		return toDoubleNum(day) + "."  + toDoubleNum(month) + "." + "2011";
	}
	
	static String toDoubleNum(int i){
		if(Integer.toString(i).length()==1){
			return ("0" + i);
		}
		else 
			return  Integer.toString(i);
	}
	
	static String DurationToString(int dur){
		int minutes = dur/60;
		int seconds = dur%60;
		return toDoubleNum(minutes)+":"+toDoubleNum(seconds)+" s";
		
	}

}
